package main.java.fases;

import java.util.Collection;
import java.util.Iterator;
import java.util.Vector;

import main.java.cartas.Carta;
import main.java.tablero.Tablero;




public class Partida extends Tablero {
	
	private Vector<Jugador> jugadores;
	
	
	public Partida(){
		
		
	}
	

	public void setJugadores(Vector<Jugador> jugadores) {
		this.jugadores = jugadores;
	}

	public Vector<Jugador> getJugadores() {
		return jugadores;
	}




	/**
	 * @uml.property  name="cartas"
	 * @uml.associationEnd  multiplicity="(1 -1)" inverse="partida:Diagrama2.Carta"
	 */
	private Collection cartas;

	/**
	 * Getter of the property <tt>cartas</tt>
	 * @return  Returns the cartas.
	 * @uml.property  name="cartas"
	 */
	public Collection getCartas() {
		return cartas;
	}

	/**
	 * Returns an iterator over the elements in this collection. 
	 * @return  an <tt>Iterator</tt> over the elements in this collection
	 * @see java.util.Collection#iterator()
	 * @uml.property  name="cartas"
	 */
	public Iterator cartasIterator() {
		return cartas.iterator();
	}

	/**
	 * Returns <tt>true</tt> if this collection contains no elements.
	 * @return  <tt>true</tt> if this collection contains no elements
	 * @see java.util.Collection#isEmpty()
	 * @uml.property  name="cartas"
	 */
	public boolean isCartasEmpty() {
		return cartas.isEmpty();
	}

	/**
	 * Returns <tt>true</tt> if this collection contains the specified element. 
	 * @param element  whose presence in this collection is to be tested.
	 * @see java.util.Collection#contains(Object)
	 * @uml.property  name="cartas"
	 */
	public boolean containsCartas(Carta cartas) {
		return this.cartas.contains(cartas);
	}

	/**
	 * Returns <tt>true</tt> if this collection contains all of the elements in the specified collection.
	 * @param elements  collection to be checked for containment in this collection.
	 * @see java.util.Collection#containsAll(Collection)
	 * @uml.property  name="cartas"
	 */
	public boolean containsAllCartas(Collection cartas) {
		return this.cartas.containsAll(cartas);
	}

	/**
	 * Returns the number of elements in this collection.
	 * @return  the number of elements in this collection
	 * @see java.util.Collection#size()
	 * @uml.property  name="cartas"
	 */
	public int cartasSize() {
		return cartas.size();
	}

	/**
	 * Returns all elements of this collection in an array.
	 * @return  an array containing all of the elements in this collection
	 * @see java.util.Collection#toArray()
	 * @uml.property  name="cartas"
	 */
	public Carta[] cartasToArray() {
		return (Carta[]) cartas.toArray(new Carta[cartas.size()]);
	}

	/**
	 * Returns an array containing all of the elements in this collection;  the runtime type of the returned array is that of the specified array.
	 * @param a  the array into which the elements of this collection are to be stored.
	 * @return  an array containing all of the elements in this collection
	 * @see java.util.Collection#toArray(Object[])
	 * @uml.property  name="cartas"
	 */
	public Carta[] cartasToArray(Carta[] cartas) {
		return (Carta[]) this.cartas.toArray(cartas);
	}

	/**
	 * Ensures that this collection contains the specified element (optional operation). 
	 * @param element  whose presence in this collection is to be ensured.
	 * @see java.util.Collection#add(Object)
	 * @uml.property  name="cartas"
	 */
	public boolean addCartas(Carta cartas) {
		return this.cartas.add(cartas);
	}

	/**
	 * Setter of the property <tt>cartas</tt>
	 * @param cartas  the cartas to set.
	 * @uml.property  name="cartas"
	 */
	public void setCartas(Collection cartas) {
		this.cartas = cartas;
	}

	/**
	 * Removes a single instance of the specified element from this collection, if it is present (optional operation).
	 * @param element  to be removed from this collection, if present.
	 * @see java.util.Collection#add(Object)
	 * @uml.property  name="cartas"
	 */
	public boolean removeCartas(Carta cartas) {
		return this.cartas.remove(cartas);
	}

	/**
	 * Removes all of the elements from this collection (optional operation).
	 * @see java.util.Collection#clear()
	 * @uml.property  name="cartas"
	 */
	public void clearCartas() {
		this.cartas.clear();
	}

	/**
	 * @uml.property  name="turnos"
	 * @uml.associationEnd  multiplicity="(1 -1)" aggregation="composite" inverse="partida:Diagrama2.Turno"
	 */
	private Vector turnos;

	/**
	 * Getter of the property <tt>turnos</tt>
	 * @return  Returns the turnos.
	 * @uml.property  name="turnos"
	 */
	public Vector getTurnos() {
		return turnos;
	}

	/**
	 * Returns an iterator over the elements in this collection. 
	 * @return  an <tt>Iterator</tt> over the elements in this collection
	 * @see java.util.Collection#iterator()
	 * @uml.property  name="turnos"
	 */
	public Iterator turnosIterator() {
		return turnos.iterator();
	}

	/**
	 * Returns <tt>true</tt> if this collection contains no elements.
	 * @return  <tt>true</tt> if this collection contains no elements
	 * @see java.util.Collection#isEmpty()
	 * @uml.property  name="turnos"
	 */
	public boolean isTurnosEmpty() {
		return turnos.isEmpty();
	}

	/**
	 * Returns <tt>true</tt> if this collection contains the specified element. 
	 * @param element  whose presence in this collection is to be tested.
	 * @see java.util.Collection#contains(Object)
	 * @uml.property  name="turnos"
	 */
	public boolean containsTurnos(Turno turnos) {
		return this.turnos.contains(turnos);
	}

	/**
	 * Returns <tt>true</tt> if this collection contains all of the elements in the specified collection.
	 * @param elements  collection to be checked for containment in this collection.
	 * @see java.util.Collection#containsAll(Collection)
	 * @uml.property  name="turnos"
	 */
	public boolean containsAllTurnos(Collection turnos) {
		return this.turnos.containsAll(turnos);
	}

	/**
	 * Returns the number of elements in this collection.
	 * @return  the number of elements in this collection
	 * @see java.util.Collection#size()
	 * @uml.property  name="turnos"
	 */
	public int turnosSize() {
		return turnos.size();
	}

	/**
	 * Returns all elements of this collection in an array.
	 * @return  an array containing all of the elements in this collection
	 * @see java.util.Collection#toArray()
	 * @uml.property  name="turnos"
	 */
	public Turno[] turnosToArray() {
		return (Turno[]) turnos.toArray(new Turno[turnos.size()]);
	}

	/**
	 * Returns an array containing all of the elements in this collection;  the runtime type of the returned array is that of the specified array.
	 * @param a  the array into which the elements of this collection are to be stored.
	 * @return  an array containing all of the elements in this collection
	 * @see java.util.Collection#toArray(Object[])
	 * @uml.property  name="turnos"
	 */
	public Turno[] turnosToArray(Turno[] turnos) {
		return (Turno[]) this.turnos.toArray(turnos);
	}

	/**
	 * Ensures that this collection contains the specified element (optional operation). 
	 * @param element  whose presence in this collection is to be ensured.
	 * @see java.util.Collection#add(Object)
	 * @uml.property  name="turnos"
	 */
	public boolean addTurnos(Turno turnos) {
		return this.turnos.add(turnos);
	}

	/**
	 * Setter of the property <tt>turnos</tt>
	 * @param turnos  the turnos to set.
	 * @uml.property  name="turnos"
	 */
	public void setTurnos(Vector turnos) {
		this.turnos = turnos;
	}

	/**
	 * Removes a single instance of the specified element from this collection, if it is present (optional operation).
	 * @param element  to be removed from this collection, if present.
	 * @see java.util.Collection#add(Object)
	 * @uml.property  name="turnos"
	 */
	public boolean removeTurnos(Turno turnos) {
		return this.turnos.remove(turnos);
	}

	/**
	 * Removes all of the elements from this collection (optional operation).
	 * @see java.util.Collection#clear()
	 * @uml.property  name="turnos"
	 */
	public void clearTurnos() {
		this.turnos.clear();
	}

	/**
	 * @uml.property  name="turno"
	 * @uml.associationEnd  multiplicity="(0 -1)" aggregation="shared" inverse="partida1:Diagrama2.Turno"
	 */
	private Vector turno;

	/** 
	 * Getter of the property <tt>turno</tt>
	 * @return  Returns the turno.
	 * @uml.property  name="turno"
	 */
	public Vector getTurno() {
		return turno;
	}

	/**
	 * Returns an iterator over the elements in this collection. 
	 * @return  an <tt>Iterator</tt> over the elements in this collection
	 * @see java.util.Collection#iterator()
	 * @uml.property  name="turno"
	 */
	public Iterator turnoIterator() {
		return turno.iterator();
	}

	/**
	 * Returns <tt>true</tt> if this collection contains no elements.
	 * @return  <tt>true</tt> if this collection contains no elements
	 * @see java.util.Collection#isEmpty()
	 * @uml.property  name="turno"
	 */
	public boolean isTurnoEmpty() {
		return turno.isEmpty();
	}

	/**
	 * Returns <tt>true</tt> if this collection contains the specified element. 
	 * @param element  whose presence in this collection is to be tested.
	 * @see java.util.Collection#contains(Object)
	 * @uml.property  name="turno"
	 */
	public boolean containsTurno(Turno turno) {
		return this.turno.contains(turno);
	}

	/**
	 * Returns <tt>true</tt> if this collection contains all of the elements in the specified collection.
	 * @param elements  collection to be checked for containment in this collection.
	 * @see java.util.Collection#containsAll(Collection)
	 * @uml.property  name="turno"
	 */
	public boolean containsAllTurno(Collection turno) {
		return this.turno.containsAll(turno);
	}

	/**
	 * Returns the number of elements in this collection.
	 * @return  the number of elements in this collection
	 * @see java.util.Collection#size()
	 * @uml.property  name="turno"
	 */
	public int turnoSize() {
		return turno.size();
	}

	/**
	 * Returns all elements of this collection in an array.
	 * @return  an array containing all of the elements in this collection
	 * @see java.util.Collection#toArray()
	 * @uml.property  name="turno"
	 */
	public Turno[] turnoToArray() {
		return (Turno[]) turno.toArray(new Turno[turno.size()]);
	}

	/**
	 * Returns an array containing all of the elements in this collection;  the runtime type of the returned array is that of the specified array.
	 * @param a  the array into which the elements of this collection are to be stored.
	 * @return  an array containing all of the elements in this collection
	 * @see java.util.Collection#toArray(Object[])
	 * @uml.property  name="turno"
	 */
	public Turno[] turnoToArray(Turno[] turno) {
		return (Turno[]) this.turno.toArray(turno);
	}

	/**
	 * Ensures that this collection contains the specified element (optional operation). 
	 * @param element  whose presence in this collection is to be ensured.
	 * @see java.util.Collection#add(Object)
	 * @uml.property  name="turno"
	 */
	public boolean addTurno(Turno turno) {
		return this.turno.add(turno);
	}

	/** 
	 * Setter of the property <tt>turno</tt>
	 * @param turno  The turno to set.
	 * @uml.property  name="turno"
	 */
	public void setTurno(Vector turno) {
		this.turno = turno;
	}

	/**
	 * Removes a single instance of the specified element from this collection, if it is present (optional operation).
	 * @param element  to be removed from this collection, if present.
	 * @see java.util.Collection#add(Object)
	 * @uml.property  name="turno"
	 */
	public boolean removeTurno(Turno turno) {
		return this.turno.remove(turno);
	}

	/**
	 * Removes all of the elements from this collection (optional operation).
	 * @see java.util.Collection#clear()
	 * @uml.property  name="turno"
	 */
	public void clearTurno() {
		this.turno.clear();
	}

	/**
	 * @uml.property  name="turno1"
	 * @uml.associationEnd  multiplicity="(0 -1)" aggregation="shared" inverse="partida1:Diagrama2.Turno"
	 */
	private Collection<Turno> turno1;

	/**
	 * Getter of the property <tt>turno1</tt>
	 * @return  Returns the turno1.
	 * @uml.property  name="turno1"
	 */
	public Collection<Turno> getTurno1() {
		return turno1;
	}

	/**
	 * Setter of the property <tt>turno1</tt>
	 * @param turno1  The turno1 to set.
	 * @uml.property  name="turno1"
	 */
	public void setTurno1(Collection<Turno> turno1) {
		this.turno1 = turno1;
	}

	/**
	 * @uml.property  name="turno2"
	 * @uml.associationEnd  inverse="partida1:fases.Turno"
	 */
	private Turno turno2;

	/**
	 * Getter of the property <tt>turno2</tt>
	 * @return  Returns the turno2.
	 * @uml.property  name="turno2"
	 */
	public Turno getTurno2() {
		return turno2;
	}

	/**
	 * Setter of the property <tt>turno2</tt>
	 * @param turno2  The turno2 to set.
	 * @uml.property  name="turno2"
	 */
	public void setTurno2(Turno turno2) {
		this.turno2 = turno2;
	}

	/**
	 * @uml.property  name="jugador"
	 * @uml.associationEnd  inverse="partida3:fases.Jugador"
	 */
	private Jugador jugador;

	/**
	 * Getter of the property <tt>jugador</tt>
	 * @return  Returns the jugador.
	 * @uml.property  name="jugador"
	 */
	public Jugador getJugador() {
		return jugador;
	}

	/**
	 * Setter of the property <tt>jugador</tt>
	 * @param jugador  The jugador to set.
	 * @uml.property  name="jugador"
	 */
	public void setJugador(Jugador jugador) {
		this.jugador = jugador;
	}

	/**
	 * @uml.property  name="dado"
	 * @uml.associationEnd  inverse="partida:fases.Dado"
	 */
	private Dado dado;

	/**
	 * Getter of the property <tt>dado</tt>
	 * @return  Returns the dado.
	 * @uml.property  name="dado"
	 */
	public Dado getDado() {
		return dado;
	}

	/**
	 * Setter of the property <tt>dado</tt>
	 * @param dado  The dado to set.
	 * @uml.property  name="dado"
	 */
	public void setDado(Dado dado) {
		this.dado = dado;
	}

	/**
	 * @uml.property   name="partida1"
	 * @uml.associationEnd   aggregation="shared" inverse="partida2:tablero.Partida"
	 */
	private Partida partida1;

	/**
	 * Getter of the property <tt>partida1</tt>
	 * @return  Returns the partida1.
	 * @uml.property  name="partida1"
	 */
	public Partida getPartida1() {
		return partida1;
	}

	/**
	 * Setter of the property <tt>partida1</tt>
	 * @param partida1  The partida1 to set.
	 * @uml.property  name="partida1"
	 */
	public void setPartida1(Partida partida1) {
		this.partida1 = partida1;
	}

	/**
	 * @uml.property   name="partida2"
	 * @uml.associationEnd   inverse="partida1:tablero.Partida"
	 */
	private Partida partida2;

	/**
	 * Getter of the property <tt>partida2</tt>
	 * @return  Returns the partida2.
	 * @uml.property  name="partida2"
	 */
	public Partida getPartida2() {
		return partida2;
	}

	/**
	 * Setter of the property <tt>partida2</tt>
	 * @param partida2  The partida2 to set.
	 * @uml.property  name="partida2"
	 */
	public void setPartida2(Partida partida2) {
		this.partida2 = partida2;
	}

	/**
	 * @uml.property  name="tablero"
	 * @uml.associationEnd  inverse="partida3:tablero.Tablero"
	 */
	private Tablero tablero;

	/**
	 * Getter of the property <tt>tablero</tt>
	 * @return  Returns the tablero.
	 * @uml.property  name="tablero"
	 */
	public Tablero getTablero() {
		return tablero;
	}

	/**
	 * Setter of the property <tt>tablero</tt>
	 * @param tablero  The tablero to set.
	 * @uml.property  name="tablero"
	 */
	public void setTablero(Tablero tablero) {
		this.tablero = tablero;
	}

}
